package coderead.maven.bean;

import lombok.Data;

import java.util.Date;

@Data
public class Artifact {
    private Integer id;

    private String artifact;

    private String lastVersion;

    private Date lastModify;

    // 0 待构建  1构建中 2构建成功 3构建失败
    private byte indexClass;
    // 官网站点
    String officialSite;
    // 文档站点
    String docSite;
    // 源码站点
    String sourceSite;
    private String describe;

    private Date dateLastModify;

    public void setArtifact(String artifact) {
        this.artifact = artifact == null ? null : artifact.trim();
    }

    public void setLastVersion(String lastVersion) {
        this.lastVersion = lastVersion == null ? null : lastVersion.trim();
    }

    public void setDescribe(String describe) {
        this.describe = describe == null ? null : describe.trim();
    }

    public String getGroupId() {
        return artifact.split(":")[0];
    }

    public Object getArtifactId() {
        return artifact.split(":")[1];
    }
}
